-
Notifications
You must be signed in to change notification settings - Fork 902
[BUG] Tags not visible when looking at transactions in the account listΒ #3640
Description
Please confirm the following
- I checked the current issues for duplicate problems
Describe the bug
When you set a tag for a transaction that tag is not visible in list of transactions for that account.
To Reproduce
- Create an expense (or an income) transaction on the home screen
- Assign it a tag
- Save the transaction
- Note the home screen nicely lists all tags at the bottom of the view
- Click accounts tab
- Click on the specific account to list all transactions for that account
- Tags is not present in any view
Expected behavior
I would expect tags to display consistently across all views, including the list of account transactions. Showing the tags in the list of transactions is very useful.
Screenshots
App version
v2024.09.29 (200) via Play Store
Smartphone
Pixel 6 - Android 14
Additional context
The views are actually fine and will show tags if presented, the problem is the tags aren't fetched from the DB.
The two views seem to fetch the tags from the database using different repositories. The working way on the home screen uses TransactionRepository.kt where the broken account page uses TransactionsViewModel -> TagRepository.
The code below from TransactionsViewModel doesn't return any tags:
history.value = ( accTrnsAct then { trnsWithDateDivsAct( LegacyTrnsWithDateDivsAct.Input( baseCurrency = baseCurrency.value, transactions = with(transactionMapper) { it.map { val tags = tagRepository.findByIds(it.tags).toImmutableLegacyTags() it.toEntity().toLegacyDomain(tags = tags) } } ) ) } )( AccTrnsAct.Input( accountId = initialAccount.id, range = range.toCloseTimeRange() ) ).toImmutableList()

