Let a split row's category and merchant be changed in its drawer

Merged
GF
14d ago
+35-2

Problem

A split row's merchant cannot be fixed after the split. In the transaction drawer the merchant picker of a split row is disabled, while the same row's tags and notes are editable. The only way to change it is to open the split editor and save the whole split again. The category picker is disabled in the same way.

Related to #2958.

Change

  • The drawer of a split row lets the user change its category and merchant. Both pickers follow the usual annotate permission.
  • Name, date and amount of a split row stay read-only and keep pointing to the split editor.
  • A category or merchant changed this way is locked like any other drawer edit, so rules skip it later. The parent and the other split rows are not changed.

Not in this PR

An earlier version also passed the parent's merchant on to its split rows. Review showed that this needed inferred locks and misfired with rules, so it was dropped.

Validation

  • New controller tests: the drawer of a split row renders category and merchant pickers enabled and the name disabled; a PATCH on a split row saves and locks category and merchant and leaves the parent and the sibling rows unchanged.
  • Full Rails test suite, system tests, RuboCop, ERB lint, Biome and Brakeman are green.