Skip to content

Stop repeating the code in Expense Review export names - #124

Merged
rmartinsen-ucd merged 1 commit into
mainfrom
rpm/export-code-twice
Nov 3, 2026
Merged

rmartinsen-ucd merged 1 commit into
mainfrom
rpm/export-code-twice

Conversation

@rmartinsen-ucd

Copy link
Copy Markdown
Contributor

Fixes #122

Cause

UCPath rows got their segment names from ChartSegments.ValueDesc, falling back to Description. In DataDb, ValueDesc is exactly Code - Description on every row in all 8 segments, so the CSV writer's Code - Name came out as 1000001 - 1000001 - Central Office AP. AE rows read their own description columns, which match ChartSegments.Description, so only some rows showed the problem.

The pre-association totals Name column had the same ValueDesc lookup.

Changes

  • ExpenseReviewService: UCPath rows read Description for all 8 segments. This also fixes the filter dropdown labels for UCPath rows.
  • AutoAssociationReportService: the pre-association totals department name reads Description.
  • ExpenseReviewCsvWriter: some AE project names already start with their code, for example SP0A241267 - Hernandez # R02CP7556. Those names are written as-is instead of getting the code added again.
  • Test data now gives ValueDesc its real Code - Description shape. New checks cover UCPath row names and the CSV project case.

ValueDesc is still imported and the schema is unchanged, so no reimport is needed.

Not in this PR

The Expense Review filter dropdowns build their labels in SQL, so project names that already start with their code still show it twice there.

Testing

dotnet test: 451 passed. The three new or changed tests failed before the fix.

🤖 Generated with Claude Code

ChartSegments.ValueDesc is always Code - Description, so UCPath rows in
Expense Review and the pre-association totals Name column showed the code
twice. Read Description instead, which matches what AE transactions carry.

Some AE project names already start with their code. The CSV writer now
writes those names as-is instead of adding the code again.

Fixes #122

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 2, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 38405702-6cd6-4850-8b3c-c149c4bae9f8
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@rmartinsen-ucd
rmartinsen-ucd merged commit b77a52c into main Nov 3, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export: Financial Dept sometimes shows the code twice

2 participants