-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When parsing certificate documents, the wire roll serial number (wire_roll_cert_number) can come from different sources depending on the workbook format:
- Old-format workbooks:
CERT, Wire Rollsheet, cell B6 - New-format workbooks:
Order Infosheet, cell B3
Currently we log which source was used, but this information isn't persisted. Adding a wire_source column (or similar) to the wire_set_certs table would let us:
- Audit/debug — quickly determine where a wire roll SN came from without re-parsing the document
- Detect format drift — identify if workbook formats are changing over time
- Extend to other fields — the same pattern could track the source of
traceability_number(cell B11 vs. content-disposition filename) andservice_date(Excel H15 vs. PDF OCR vs. Qualer service record)
Current code reference: The TODO is on parse.py, where wire_source is set to a descriptive string but only used in log messages.
Suggested implementation:
- Add a nullable
Textcolumn (e.g.wire_roll_source) towire_set_certs - Populate it with the source string already being built in
parse_certificate_data_excel(e.g."sheet='CERT, Wire Roll', cell=B6") - Consider whether to also track sources for
traceability_numberandservice_datein the same migration
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request