Add Description field to job CSV import template
JobImportDto was missing Description despite Job entity having the field. Downloadable template now includes a Description column; the importer maps it directly to Job.Description with a fallback chain of Description -> SpecialInstructions -> "Imported job". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -262,6 +262,7 @@ public class CsvImportService : ICsvImportService
|
||||
JobNumber = "JOB-2601-0001",
|
||||
CustomerEmail = "customer@example.com",
|
||||
CustomerName = "Acme Corp (used if email is blank or not found)",
|
||||
Description = "Sample job description",
|
||||
Status = "Pending",
|
||||
Priority = "Normal",
|
||||
ScheduledDate = DateTime.Today.AddDays(7),
|
||||
@@ -269,7 +270,7 @@ public class CsvImportService : ICsvImportService
|
||||
FinalPrice = 750.00m,
|
||||
CustomerPO = "PO-12345",
|
||||
SpecialInstructions = "Handle with care",
|
||||
Notes = "Sample job"
|
||||
Notes = "Internal notes"
|
||||
});
|
||||
csv.NextRecord();
|
||||
|
||||
@@ -1435,7 +1436,9 @@ public class CsvImportService : ICsvImportService
|
||||
CustomerPO = record.CustomerPO?.Trim(),
|
||||
SpecialInstructions = record.SpecialInstructions?.Trim(),
|
||||
InternalNotes = record.Notes?.Trim(),
|
||||
Description = record.SpecialInstructions?.Trim() ?? "Imported job",
|
||||
Description = record.Description?.Trim()
|
||||
?? record.SpecialInstructions?.Trim()
|
||||
?? "Imported job",
|
||||
CreatedAt = DateTime.UtcNow,
|
||||
UpdatedAt = DateTime.UtcNow
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user