From 2e593a002248de9857a086703d7e29c55965225b Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Wed, 2 Apr 2025 10:00:25 -0700
Subject: [PATCH] Fix: fix potential race condition when creating new custom
fields on doc details (#9542)
---
src-ui/messages.xlf | 36 +++++++++----------
.../document-detail.component.ts | 4 +--
2 files changed, 19 insertions(+), 21 deletions(-)
diff --git a/src-ui/messages.xlf b/src-ui/messages.xlf
index 7a7e95891..7ea6ab923 100644
--- a/src-ui/messages.xlf
+++ b/src-ui/messages.xlf
@@ -2541,15 +2541,15 @@
src/app/components/document-detail/document-detail.component.ts
- 1325
+ 1323src/app/components/document-detail/document-detail.component.ts
- 1364
+ 1362src/app/components/document-detail/document-detail.component.ts
- 1405
+ 1403src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -3406,7 +3406,7 @@
src/app/components/document-detail/document-detail.component.ts
- 1382
+ 1380src/app/guards/dirty-saved-view.guard.ts
@@ -7022,35 +7022,35 @@
Split confirmsrc/app/components/document-detail/document-detail.component.ts
- 1323
+ 1321This operation will split the selected document(s) into new documents.src/app/components/document-detail/document-detail.component.ts
- 1324
+ 1322Split operation for "" will begin in the background.src/app/components/document-detail/document-detail.component.ts
- 1340
+ 1338Error executing split operationsrc/app/components/document-detail/document-detail.component.ts
- 1349
+ 1347Rotate confirmsrc/app/components/document-detail/document-detail.component.ts
- 1362
+ 1360src/app/components/document-list/bulk-editor/bulk-editor.component.ts
@@ -7061,60 +7061,60 @@
This operation will permanently rotate the original version of the current document.src/app/components/document-detail/document-detail.component.ts
- 1363
+ 1361Rotation of "" will begin in the background. Close and re-open the document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1379
+ 1377Error executing rotate operationsrc/app/components/document-detail/document-detail.component.ts
- 1391
+ 1389Delete pages confirmsrc/app/components/document-detail/document-detail.component.ts
- 1403
+ 1401This operation will permanently delete the selected pages from the original document.src/app/components/document-detail/document-detail.component.ts
- 1404
+ 1402Delete pages operation for "" will begin in the background. Close and re-open or reload this document after the operation has completed to see the changes.src/app/components/document-detail/document-detail.component.ts
- 1419
+ 1417Error executing delete pages operationsrc/app/components/document-detail/document-detail.component.ts
- 1428
+ 1426An error occurred loading tiff: src/app/components/document-detail/document-detail.component.ts
- 1488
+ 1486src/app/components/document-detail/document-detail.component.ts
- 1492
+ 1490
diff --git a/src-ui/src/app/components/document-detail/document-detail.component.ts b/src-ui/src/app/components/document-detail/document-detail.component.ts
index 00e34fe93..130acbd05 100644
--- a/src-ui/src/app/components/document-detail/document-detail.component.ts
+++ b/src-ui/src/app/components/document-detail/document-detail.component.ts
@@ -1286,9 +1286,7 @@ export class DocumentDetailComponent
this.document.custom_fields?.forEach((fieldInstance) => {
this.customFieldFormFields.push(
new FormGroup({
- field: new FormControl(
- this.getCustomFieldFromInstance(fieldInstance)?.id
- ),
+ field: new FormControl(fieldInstance.field),
value: new FormControl(fieldInstance.value),
}),
{ emitEvent }