upiq / uu.task

Task management add-on for Plone
0 stars 1 forks source link

Invariant on due-date rules prevents modification #24

Closed seanupton closed 9 years ago

seanupton commented 9 years ago

Ref commit: https://github.com/upiq/uu.task/commit/19a04532c3f2fc73b120538859480aa6c549285e

Once you have specified one of the three mutually exclusive choices, it is often impossible to modify without invariant raising Invalid.

Somehow we need some normalization to appropriately choose (in JavaScript, most likely) just one to submit. Ideally, any solution to this should preserve intent of user, allowing them to choose one or the other without clearing the mutually exclusive choices, but instead just hiding/ignoring until after submit/save.

garbas commented 9 years ago

@seanupton in javascript widget will submit dict with type attribute eg "{ "type": "date", ... }" which selects one of previous fields. invariant method is then not needed since front end can only select one

garbas commented 9 years ago

does this clarifies things a bit?

seanupton commented 9 years ago

@garbas I suspected as much.