Commit c009bdd
fix: template duplication — fix FieldGroup children + restore ReportH1-H5
Two bugs in the template duplicate flow (EFormService.CreateFields):
1. FieldGroup children were pre-assigned CheckListId but never got
ParentFieldId set after the parent was created. The children were
embedded in field.Children and implicitly saved by field.Create(),
but without the correct ParentFieldId. Fix: detach children before
creating the parent, then create each child separately with both
CheckListId and ParentFieldId = field.Id set.
2. ReportH1-H5 were commented out in FindTemplates, so duplicated
eforms silently lost their report headers. Uncommented.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent a7a1300 commit c009bdd
1 file changed
Lines changed: 14 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
770 | | - | |
771 | | - | |
772 | | - | |
773 | | - | |
774 | | - | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
775 | 775 | | |
776 | 776 | | |
777 | 777 | | |
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
943 | | - | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
944 | 948 | | |
945 | | - | |
| 949 | + | |
946 | 950 | | |
947 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
948 | 954 | | |
949 | 955 | | |
950 | | - | |
951 | | - | |
952 | 956 | | |
953 | 957 | | |
954 | 958 | | |
| |||
0 commit comments