diff --git a/ui/src/components/NewGoalDialog.tsx b/ui/src/components/NewGoalDialog.tsx
index a589cfae8d..a41ea3e4e5 100644
--- a/ui/src/components/NewGoalDialog.tsx
+++ b/ui/src/components/NewGoalDialog.tsx
@@ -124,7 +124,7 @@ export function NewGoalDialog() {
{selectedCompany && (
- {selectedCompany.name.slice(0, 3).toUpperCase()}
+ {selectedCompany.issuePrefix}
)}
›
diff --git a/ui/src/components/NewIssueDialog.test.tsx b/ui/src/components/NewIssueDialog.test.tsx
index 5b11679b0f..a41c886b2a 100644
--- a/ui/src/components/NewIssueDialog.test.tsx
+++ b/ui/src/components/NewIssueDialog.test.tsx
@@ -1362,4 +1362,35 @@ describe("NewIssueDialog", () => {
act(() => root.unmount());
});
});
+
+ describe("PAP-8501: company badge shows issuePrefix", () => {
+ it("displays issuePrefix instead of name-derived prefix", async () => {
+ // Override company data to have mismatched name/prefix
+ companyState.companies = [
+ {
+ id: "company-1",
+ name: "Acme Labs",
+ status: "active",
+ brandColor: "#123456",
+ issuePrefix: "OPS",
+ },
+ ];
+ companyState.selectedCompany = {
+ id: "company-1",
+ name: "Acme Labs",
+ status: "active",
+ brandColor: "#123456",
+ issuePrefix: "OPS",
+ };
+
+ const { root } = renderDialog(container);
+ await waitForAssertion(() => {
+ const text = container.textContent ?? "";
+ // Should show OPS (issuePrefix), not ACM (name.slice(0,3))
+ expect(text).toContain("OPS");
+ });
+
+ act(() => root.unmount());
+ });
+ });
});
diff --git a/ui/src/components/NewIssueDialog.tsx b/ui/src/components/NewIssueDialog.tsx
index 35d1f627ba..8c88565239 100644
--- a/ui/src/components/NewIssueDialog.tsx
+++ b/ui/src/components/NewIssueDialog.tsx
@@ -1336,7 +1336,7 @@ export function NewIssueDialog() {
: undefined
}
>
- {(dialogCompany?.name ?? "").slice(0, 3).toUpperCase()}
+ {dialogCompany?.issuePrefix ?? ""}
@@ -1366,7 +1366,7 @@ export function NewIssueDialog() {
: undefined
}
>
- {c.name.slice(0, 3).toUpperCase()}
+ {c.issuePrefix}
{c.name}
diff --git a/ui/src/components/NewProjectDialog.tsx b/ui/src/components/NewProjectDialog.tsx
index f7268c4d43..7bb3158f7d 100644
--- a/ui/src/components/NewProjectDialog.tsx
+++ b/ui/src/components/NewProjectDialog.tsx
@@ -219,7 +219,7 @@ export function NewProjectDialog() {
{selectedCompany && (
- {selectedCompany.name.slice(0, 3).toUpperCase()}
+ {selectedCompany.issuePrefix}
)}
›