(Neil's AI agent)
Part of the [Tracking] [Insights Violations] Release 1 issue: Expensify/Expensify#656401
Phase 5 of the Release 1 implementation order. Depends on Phase 4: #95858 (filter display + empty state - App).
These two App sections are combined so the feature launches in a complete state.
Suggested search (App)
Add the "Violations by submitter" suggested search to the Spend page.
- Add a
VIOLATIONS_BY_SUBMITTER constant under SEARCH_KEYS and the translation key search.tabs.violationsBySubmitter.
- Add the
has:submitted-violation filter to CONST.SEARCH.HAS_VALUES.
- Build the
searchQuery with buildQueryStringFromFilterFormValues (type EXPENSE, group-by:from, date:last-month, has:submitted-violation, view:table, limit:10, sorted by group-expenses descending), and define the TopSearchMenuItem in getSuggestedSearches (icon UserEye).
- Ensure the
UserEye icon is loaded (add to SearchTypeMenuItem and the useMemoizedLazyExpensifyIcons calls).
- Add visibility logic in
getSuggestedSearchesVisibility (admins/auditors on a Rules-enabled workspace with more than one member), add the key to insightsSearchKeys in createTypeMenuSections, and to eligibleSearchKeys in useSearchShouldCalculateTotals.
Expanding a Violations by submitter group (App)
Add a Violations column showing which rules each expense broke at submission time.
- Rename
exportedReportActions in TransactionGroupListExpanded to a generic reportActions.
- Add
VIOLATIONS = 'violations' under CONST.SEARCH.TABLE_COLUMNS, an optional violations field on OriginalMessageSubmitted, and a common.violations translation key.
- Add
getSubmittedViolationsForTransaction in SearchUIUtils that aggregates violations across every SUBMITTED / SUBMITTED_AND_CLOSED action for a transaction, deduped by name.
- Show the column via
getColumnsToShow/updateColumns when report actions contain violation data, register it in getExpenseHeaders, and render the cell in renderColumn (wide + narrow rows) as a TextCell.
Repo: App (frontend).
Full details
Issue Owner
Current Issue Owner: @nkdengineer
(Neil's AI agent)
Part of the [Tracking] [Insights Violations] Release 1 issue: Expensify/Expensify#656401
Phase 5 of the Release 1 implementation order. Depends on Phase 4: #95858 (filter display + empty state - App).
These two App sections are combined so the feature launches in a complete state.
Suggested search (App)
Add the "Violations by submitter" suggested search to the Spend page.
VIOLATIONS_BY_SUBMITTERconstant underSEARCH_KEYSand the translation keysearch.tabs.violationsBySubmitter.has:submitted-violationfilter toCONST.SEARCH.HAS_VALUES.searchQuerywithbuildQueryStringFromFilterFormValues(typeEXPENSE,group-by:from,date:last-month,has:submitted-violation,view:table,limit:10, sorted bygroup-expensesdescending), and define theTopSearchMenuItemingetSuggestedSearches(iconUserEye).UserEyeicon is loaded (add toSearchTypeMenuItemand theuseMemoizedLazyExpensifyIconscalls).getSuggestedSearchesVisibility(admins/auditors on a Rules-enabled workspace with more than one member), add the key toinsightsSearchKeysincreateTypeMenuSections, and toeligibleSearchKeysinuseSearchShouldCalculateTotals.Expanding a Violations by submitter group (App)
Add a Violations column showing which rules each expense broke at submission time.
exportedReportActionsinTransactionGroupListExpandedto a genericreportActions.VIOLATIONS = 'violations'underCONST.SEARCH.TABLE_COLUMNS, an optionalviolationsfield onOriginalMessageSubmitted, and acommon.violationstranslation key.getSubmittedViolationsForTransactioninSearchUIUtilsthat aggregates violations across every SUBMITTED / SUBMITTED_AND_CLOSED action for a transaction, deduped by name.getColumnsToShow/updateColumnswhen report actions contain violation data, register it ingetExpenseHeaders, and render the cell inrenderColumn(wide + narrow rows) as aTextCell.Repo: App (frontend).
Full details
Issue Owner
Current Issue Owner: @nkdengineer