Add support for assigning tags in transaction splits editor
ClosedPublic

Authored by habacker on Feb 6 2019, 3:57 PM.

Details

Summary

In the transaction split editor the tags column is designed similar
to categories and shows the assigned tags as text.
On editing a split a drop down box with all available tags and
checkboxes for removing assigned tags are visible.

Because tags are always assigned to splits, adding tags by the transaction
split editor works in the same way as adding tags in the ledger view.

Please note that the report engine is not able to filter
tags on categories yet.

Ported to KF5 from commit c712d81154ef2fd5bb136bc4521ba3d046b74ba6.

BUG:341589
FIXED-IN:4.8.4,5.0.4

Test Plan

compiled and test on linux

  • adding and removing tags
  • save and edit transactions with tags added
  • save and load kmymoney file with tags appended to splits

Diff Detail

Repository
R261 KMyMoney
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
habacker requested review of this revision.Feb 6 2019, 3:57 PM
habacker created this revision.

Is it intended that there can be tags on the transaction itself, and also on each split? (This is OK - I just want to be sure it is what is intended.)

The tag box in the main transaction form is a dropdown with all tags that match whatever has been typed. In the split editor, the tag box is only a line edit. Using the same dropdown would probably be more useful.

When the transaction is shown in the register, only transaction level tags are displayed. I suppose this matches other split items, so it's OK - I just want to confirm it is as intended.

Question (I have not tested) will transaction search have the same behavior for tags as it does for categories as they are in splits and not the main transaction?

habacker updated this revision to Diff 51204.Feb 8 2019, 6:13 PM
habacker retitled this revision from Add gui part for assigning tags in transaction splits editor to Add support for assigning tags in transaction splits editor.
habacker edited the summary of this revision. (Show Details)
  • fixed initial dialog size
  • extended commit messaga

Tags are always assigned to splits not transactions.

habacker updated this revision to Diff 51238.Feb 9 2019, 9:29 AM
habacker edited the summary of this revision. (Show Details)
  • added Thomas notes to commit message

If tags are always assigned to splits, then does a tag being shown for a transaction simply mean it is attached to all splits of the transaction? If so, then it might be nice to show for the transaction all tags attached to any splits, with some indication whether the tag is attached to all splits or only some (bold or not, different colors, different font, ...?)

tbaumgart accepted this revision.Mar 24 2019, 8:51 AM

Looks OK to me (except that one little spot I marked) for a first shot.

kmymoney/dialogs/kmymoneysplittable.cpp
918

This is dead code

This revision is now accepted and ready to land.Mar 24 2019, 8:51 AM
habacker updated this revision to Diff 54672.Mar 24 2019, 1:18 PM
  • removed dead code9
This revision was automatically updated to reflect the committed changes.