klequis / private-money-client

5 stars 2 forks source link

Unchecking 'omit' has multiple problems #8

Closed klequis closed 3 years ago

klequis commented 3 years ago
  1. Open tx with omit rule
  2. Uncheck omit
    • Expected: default actions should show in UI
    • Actual: default actions do not show (the area has not content)
  3. Save
    • Expected: Saving of default actions should not be possible as it would create a rule that results in no change to data.
    • Actual: Rule is saved to db with an empty actions array
klequis commented 3 years ago

While it is true that you should not be able to save default actions as they do nothing, it is possible that criteria were changed before actions were changed before actions were reset to default.

Therefore:

I could take an existing rule, change the criteria and then save. So there seems to be some interaction between new vs existing rule && criteria vs actions change that needs to be fleshed out.

klequis commented 3 years ago

New Rule

Existing Rule

New Rule

Needs more thought but one possibility is:

Another thought is

klequis commented 3 years ago

Notes:

isDirty === false

Seems odd but at this point if rule were to be saved

  1. it would remove the omit rule from the db
  2. but it will become a rule that effect no change on the data. Therefore why save it.

From a users perspective this is confusing. Could put a notice that user needs to 1) delete the rule or 2) make a change to the rule and save it.

Going to leave it as is for now.

klequis commented 3 years ago

closing