Merge branch 'main' into avm99963-monorail

Merged commit 34d8229ae2b51fb1a15bd208e6fe6185c94f6266

GitOrigin-RevId: 7ee0917f93a577e475f8e09526dd144d245593f4
diff --git a/api/v3/issues_servicer.py b/api/v3/issues_servicer.py
index e5ff087..5b28dea 100644
--- a/api/v3/issues_servicer.py
+++ b/api/v3/issues_servicer.py
@@ -1,7 +1,6 @@
-# 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
+# Copyright 2020 The Chromium Authors
+# 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
@@ -51,7 +50,9 @@
       project = we.GetProjectByName(rnc.IngestProjectFromIssue(request.name))
       mc.LookupLoggedInUserPerms(project)
       issue = we.GetIssue(issue_id, allow_viewing_deleted=True)
-    return self.converter.ConvertIssue(issue)
+      migrated_id = we.GetIssueMigratedID(
+          project.project_name, issue.local_id, issue.labels)
+    return self.converter.ConvertIssue(issue, migrated_id)
 
   @monorail_servicer.PRPCMethod
   def BatchGetIssues(self, mc, request):
@@ -82,7 +83,7 @@
               err_agg.AddErrorMessage(
                   '%s is not a child issue of %s.' % (name, request.parent))
           except exceptions.InputException as e:
-            err_agg.AddErrorMessage(e.message)
+            err_agg.AddErrorMessage(str(e))
     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