Browse Source

feat(ecosystem): Rename issue owners to ownership rules (#44637)

behind the streamline-targeting-context flag, except the route part
Scott Cooper 2 years ago
parent
commit
94b970d531

+ 1 - 1
static/app/routes.tsx

@@ -459,7 +459,7 @@ function buildRoutes() {
       />
       <Route
         path="ownership/"
-        name={t('Issue Owners')}
+        name={t('Ownership Rules')}
         component={make(() => import('sentry/views/settings/project/projectOwnership'))}
       />
       <Route

+ 4 - 2
static/app/views/settings/project/navigationConfiguration.tsx

@@ -48,8 +48,10 @@ export default function getConfiguration({
         },
         {
           path: `${pathPrefix}/ownership/`,
-          title: t('Issue Owners'),
-          description: t('Manage issue ownership rules for a project'),
+          title: organization?.features?.includes('streamline-targeting-context')
+            ? t('Ownership Rules')
+            : t('Issue Owners'),
+          description: t('Manage ownership rules for a project'),
         },
         {
           path: `${pathPrefix}/data-forwarding/`,

+ 10 - 2
static/app/views/settings/project/projectOwnership/index.tsx

@@ -32,9 +32,17 @@ type State = {
 } & AsyncView['state'];
 
 class ProjectOwnership extends AsyncView<Props, State> {
+  // TODO: Remove with `streamline-targeting-context`
+  getOwnershipTitle() {
+    const {organization} = this.props;
+    return organization.features?.includes('streamline-targeting-context')
+      ? t('Ownership Rules')
+      : t('Issue Owners');
+  }
+
   getTitle() {
     const {project} = this.props;
-    return routeTitleGen(t('Issue Owners'), project.slug, false);
+    return routeTitleGen(this.getOwnershipTitle(), project.slug, false);
   }
 
   getEndpoints(): ReturnType<AsyncView['getEndpoints']> {
@@ -243,7 +251,7 @@ tags.sku_class:enterprise #enterprise`;
     return (
       <Fragment>
         <SettingsPageHeader
-          title={t('Issue Owners')}
+          title={this.getOwnershipTitle()}
           action={
             <Fragment>
               <Button