fix(approvals): isMachineId catches 20+ hex anywhere in string
Previous regex was anchored to whole string. Real EA2 display_names
embed the 32-hex case-key as a prefix ('25f89310... #7a9cd1d1'), so
they slipped through. Now any 20-char hex run anywhere in the string
flips the value to machine-shaped.
This commit is contained in:
@@ -26,7 +26,9 @@ function ageLabel(item: WorkItem): string {
|
||||
|
||||
function isMachineId(s?: string | null): boolean {
|
||||
if (!s) return true;
|
||||
return /^[a-f0-9]{20,}$/i.test(s) || /^process_\d{10,}$/.test(s);
|
||||
if (/[a-f0-9]{20,}/i.test(s)) return true;
|
||||
if (/^process_\d{10,}/.test(s)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
function friendlyCaseTitle(item: WorkItem): string {
|
||||
|
||||
Reference in New Issue
Block a user