BOM export pack: previous revision query returns the same revision (always empty diff) #5
Labels
No labels
blocked:needs-attention
blocked:needs-decision
bug
chore
in-progress
quickfix
security/high
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
AuWoMe/forgeflow#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Severity: Medium
File:
src/app/api/boms/[bomId]/export/route.ts(lines 156-159)Issue: When generating an export pack, the "previous revision" query uses
descordering which returns the LATEST revision first — the same aslatestRevision. So the diff comparison is always between the same revision, producing empty diff results:Effect: The
_CHANGES.mdfile is never included in export packs, and the diff report is always null. Users never see revision diffs in their exported ZIP.Fix: Fetch the second-most-recent revision by filtering for
revNumber < latestRevision.revNumber: